package com.ryan.spring.annotation.custom;

import org.springframework.core.io.Resource;
import org.springframework.core.type.ClassMetadata;
import org.springframework.core.type.classreading.MetadataReader;
import org.springframework.core.type.classreading.MetadataReaderFactory;
import org.springframework.core.type.filter.TypeFilter;

import java.io.IOException;

/**
 * Created by kaimin on 24/1/2019.
 * time : 23:05
 * //自定义的包扫描的过滤规则
 */
public class MyTypeFilter implements TypeFilter {
    public boolean match(MetadataReader metadataReader, MetadataReaderFactory metadataReaderFactory) throws IOException {
        //获取当前类信息
        ClassMetadata classMetadata = metadataReader.getClassMetadata();
        //获取resource 资源
       Resource resource = metadataReader.getResource();
        return false;
    }
}
